<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Go + WebAssembly</title>
    <script src="wasm_exec.js"></script>
</head>
<body>
    <script>
        (async function loadAndRunGoWasm() {
            const go = new Go();
            const response = await fetch("main.wasm");
            const buffer = await response.arrayBuffer();
            const result = await WebAssembly.instantiate(buffer, go.importObject);
            go.run(result.instance)
        })()
    </script>
</body>
</html>
